<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ page import="performReservation.SMMDBBean"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.Vector"%>
<%!
	Vector<String[]> vec = new Vector<String[]>();
	String sale_num = null;
	String per_num =null;
	String cin_num = null;
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Booking system.</title>
</head>
<body>
	<%
		sale_num = request.getParameter("num");
		if(!sale_num.equals("")){
			SMMDBBean pProcess = SMMDBBean.getInstance();
			vec = pProcess.getSaleDetail(sale_num);
			if(vec!=null){
				for(int i = 0; i < vec.size(); i++){
					String[] newSale = new String[6];
					newSale = vec.get(i);
					per_num  = newSale[1];
					cin_num  = newSale[2];
					String[] cinema = pProcess.getCinemaDetail(cin_num).get(0);
					String[] perform = pProcess.getSpeficPerformDetail(per_num).get(0);
					%>
						<center>
							<div>
								<h3>Performance</h3>
								<p>Perform Name :<%=perform[2] %></p>
								<p>Perform Director :<%=perform[1] %></p>
								<p>Perform Language :<%=perform[5] %></p>
								<p>Perform Category :<%=perform[6] %></p>
								<p>Perform release  :<%=perform[4] %></p>
								<p>Perform Info : <%=perform[3] %></p>
							</div>
						</center>
						<hr>
						<center>
							<div>
								<h3>Cinema</h3>
								<p>Cinema Name:<%=cinema[1] %></p>
								<p>Cinema Phone:<%=cinema[2] %></p>
								<p>Cinema Address:<%=cinema[3] %></p>
								<p>Cinema Info:<%=cinema[4] %></p>
								
							</div>
						</center>
						<hr>
						<center>
							<div>
								<FORM METHOD=POST ACTION="bookingPro.jsp?num=<%=sale_num %>">
									<INPUT TYPE="text" NAME="booking"><INPUT TYPE="submit" NAME="Booking" Value="Booking">
									
									<input type="button" value="delete" onclick="window.location.href='deleteOrder.jsp?num=<%=sale_num %>'" />
								</FORM>
						
							</div>
							
						</center>
						<hr>
					<%
				}
			}else{
				
			}
		}else{
			
		}
	%>
</body>
</html>